package cn.edu.cqut.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Many;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.mapping.FetchType;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import cn.edu.cqut.entity.Chance;
import cn.edu.cqut.entity.ReportModel;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author HQYJ
 * @since 2020-06-24
 */
public interface ChanceMapper extends BaseMapper<Chance> {
	@Select("select * from chance")
	@Results({
		@Result(column="ch_no",property="chNo"),
		@Result(column="ch_no",property="plans",
				many = @Many(select ="cn.edu.cqut.mapper.PlanMapper.selectPlanByChNo",fetchType = FetchType.EAGER))
	})
	public List<Chance> selectChanceWithPlan();
	}
